﻿using StructureMap;
using TimeTracker.Core.Services;
using TimeTracker.Web.Account.Interface;

namespace TimeTracker.Web.Account.Presenter
{
    public class OdjavaPresenter
    {
        private IRedirectorService _redirectorService;
        private IKorisnikService _korisnikService;

        public void Init(IOdjavaView view)
        {
            ObjectFactory.GetInstance<IKorisnikSession>();
            _redirectorService = ObjectFactory.GetInstance<IRedirectorService>();
            _korisnikService = ObjectFactory.GetInstance<IKorisnikService>();
        }

        public void Odjavi()
        {
            _korisnikService.Odjavi();
            _redirectorService.IdiNaStranuPrijave();
        }
    }
}
